package com.jemmyee.pizza.service;

import java.io.Serializable;
import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.criterion.DetachedCriteria;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.jemmyee.core.dao.Page;
import com.jemmyee.pizza.dao.IApplyCommentDao;
import com.jemmyee.pizza.entity.ApplyComment;

@Repository("applyCommentService")
public class ApplyCommentServiceImpl implements IApplyCommentService<ApplyComment>{

	private static final Log log = LogFactory.getLog(ApplyCommentServiceImpl.class) ;
	
	@Autowired
	private IApplyCommentDao applyCommentDao;
	
	public void delete(ApplyComment entity) {
		applyCommentDao.delete(entity);
	}

	public void deleteAll(List<ApplyComment> list) {
		applyCommentDao.deleteAll(list);
	}

	public void deleteById(Serializable id) {
		applyCommentDao.deleteById(id);
	}

	public List<ApplyComment> findAll() {
		return applyCommentDao.findAll(new ApplyComment());
	}

	public List<ApplyComment> findByCriteria(DetachedCriteria criteria) {
		return applyCommentDao.findByCriteria(criteria);
	}

	public ApplyComment findById(Serializable id) {
		return applyCommentDao.findById(id);
	}

	public List<ApplyComment> findByProperty(String propertyName, Object value) {
		return applyCommentDao.findByProperty(new ApplyComment(), propertyName, value);
	}

	public Page findPageByCriteria(DetachedCriteria detachedCriteria,
			int pageSize, int startIndex,String order) {
		return applyCommentDao.findPageByCriteria(detachedCriteria, pageSize, startIndex,order);
	}

	public void save(ApplyComment entity) {
		applyCommentDao.save(entity);		
	}

	public void update(ApplyComment entity) {
		applyCommentDao.update(entity);
	}

	public List<ApplyComment> findByLimit(String[] limits, String orderby) {
		return applyCommentDao.findByLimits(limits, orderby);
	}

}
